<%@ include file="/common/taglibs.jsp" %>

<head>
    <title><fmt:message key="hospital.list.title"/></title>
    <meta name="heading" content="<fmt:message key='hospital.list.heading'/>"/>
    <meta name="menu" content="AdminMenu"/>
</head>

<div class="span12">
    <h2><fmt:message key="hospital.list.heading"/></h2>

    <div id="search">
        <form method="get" action="${ctx}/zhospitals.action" id="searchForm" class="form-search">
            <input type="text" size="20" name="q" id="query" value="${param.q}"
                   placeholder="Enter search terms..." class="input-medium search-query"/>
            <input type="submit" value="<fmt:message key="button.search"/>" class="btn"/>
        </form>
    </div>

    
    <display:table name="hospitalList" cellspacing="0" cellpadding="0" requestURI=""
                   defaultsort="1" id="hospitals" pagesize="25" class="table table-condensed" export="false">
        <display:column property="name" escapeXml="true" sortable="false" titleKey="hospital.name" style="width: 25%"
                        url="/editHospital.action?from=list" paramId="id" paramProperty="id"/>
        <display:column property="registrationNumber" escapeXml="true" sortable="false" titleKey="hospital.registrationNumber"
                        style="width: 20%"/>
		<display:column property="status" escapeXml="true" sortable="false" titleKey="hospital.status"
                        style="width: 10%"/>                        
        <display:column property="email" sortable="false" titleKey="hospital.email" style="width: 25%" autolink="true"
                        media="html"/>
        <display:column property="address" titleKey="hospital.address" media="csv xml excel pdf"/>
        <display:column sortProperty="contactName" sortable="false" titleKey="hospital.contactName"
                        style="width: 14%; padding-left: 15px" media="html"/>
                   
        <display:column property="contactName" titleKey="hospital.contactName" media="csv xml excel pdf"/>

		<display:column  style="width: 7%">
			<a href="zhospitalBirths.action?from=list&id=<c:out value="${hospitals.id}"/>">Births</a>
		</display:column>
		<display:column  style="width: 7%">
			<a href="hospitalDashboard.action?from=list&hospitalId=<c:out value="${hospitals.id}"/>">Summary</a>
		</display:column>
		
        <display:setProperty name="paging.banner.item_name" value="hospital"/>
        <display:setProperty name="paging.banner.items_name" value="hospitals"/>

        <display:setProperty name="export.excel.filename" value="Hospital List.xls"/>
        <display:setProperty name="export.csv.filename" value="Hospital List.csv"/>
        <display:setProperty name="export.pdf.filename" value="Hospital List.pdf"/>
    </display:table>
</div>
